<template>
  <div>
    <ul class="group-city-ul">
    <li v-for="(item,index) in groupcitylist" :key="index" class="group-city-li" @click="GetCity(item)">{{item.name}}</li>
    </ul>
    </div>
</template>

<script>
export default {
  props:['groupcitylist'],
  methods: {
    GetCity(item){
      this.$router.push({name:'City',params:{id:item.id}});
    }
  },
}
</script>

<style lang="less">
  .group-city-ul {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e4e4e4;
    .group-city-li {
      color: #666;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 34px;
      width: 25%;
      box-sizing: border-box;
      border-bottom: 1px solid #e4e4e4;
      border-right: 1px solid #e4e4e4;
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
      .group-city-li:nth-child(-n+4){
        border-top: 1px solid #e4e4e4;
      }
  }
</style>